import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent as DHomeComponent } from './home/home.component';
import { LoginComponent } from './login/login.component';
import { ManagerRequisitionDetailComponent } from './manager-requisition-detail/manager-requisition-detail.component';
import { ManagerRequisitionListComponent } from './manager-requisition-list/manager-requisition-list.component';
import { PurchaseDetailComponent } from './purchase-detail/purchase-detail.component';
import { PurchaseListComponent } from './purchase-list/purchase-list.component';
import { RequisitionDetailComponent } from './requisition-detail/requisition-detail.component';
import { RequisitionListComponent } from './requisition-list/requisition-list.component';

const routes: Routes = [
  {
    path: '',
    redirectTo: 'login',
    pathMatch: 'full'
  },
  {
    path: 'login',
    component: LoginComponent
  }, {
    path: 'home',
    component: DHomeComponent
  }, {
    path: 'purchaseList',
    component: PurchaseListComponent
  }, {
    path: 'purchaseDetail/:type',
    component: PurchaseDetailComponent
  }, {
    path: 'requisitionList',
    component: RequisitionListComponent
  }, {
    path: 'requisitionDetail/:type',
    component: RequisitionDetailComponent
  }, {
    path: 'managerRequisitionList',
    component: ManagerRequisitionListComponent
  }, {
    path: 'managerRequisitionDetail/:type',
    component: ManagerRequisitionDetailComponent
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class RMobileRoutingModule { }
